import Vue from 'vue'

import Home from '@/views/Home'
import News from '@/views/News'
import Sports from '@/views/Sports'

import InternationalSports from '@/views/second/InternationalSports'
import NationalSports from '@/views/second/NationalSports'
import SportsHome from '@/views/second/SportsHome'

import VueRouter from 'vue-router'

Vue.use(VueRouter)
const router=new VueRouter({
    routes:[
        {
            path:'/',
            redirect:'/news'
        },
        {
            path:'/home',
            component:Home
        },
        {
            path:'/news',
            component:News
        },
        {
            path:'/sports',
            component:Sports,
            children:[
                {
                    path:'/sports/internationalsports',
                    component:InternationalSports
                },
                {
                    path:'/sports/nationalsports',
                    component:NationalSports
                },
                {
                    path:'/sports/sportshome',
                    component:SportsHome
                }
            ]
        },
    ]
})

export default router